#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

long Fast_Power_Multiplication(long x, long n)
{
	if (x == 0)
		return 0;
	if (n == 0)
		return 1;
	else
	{
		long y = Fast_Power_Multiplication(x, n / 2);
		if (n % 2 == 0)
			return y*y;
		else
			return x*y*y;
	}
}
int main()
{
	long x, n;
	cout << "Please enter the value of x and n:>";
	cin >> x >> n;
	cout << Fast_Power_Multiplication(x, n) << endl;
	return 0;
}